const http = require('http')
const child=require('child_process').fork('./child.js')
const server=http.createServer()
server.on('connection',function(socket){
  console.log(socket.remoteAddress);
  if(socket.remoteAddress!=='127.0.0.1'){
    child.send('socket',socket)
  }else{
    console.log('父进程处理');
  }
})
server.listen(1337,'localhost',()=>{
  console.log(server.address());
})
